﻿#pragma once

#include "Path/Path.h"
#include "Ability/Group/EditorAbilityGroupModel.h"
#include "Language/EditorScriptDebugSubsystem.h"
#include "EditorDebugAndRunAbilityGroupModel.m.h"

class CTCPClient;


RENUM()
enum class EDebugConfiguration
{
    Project,
    AttachToProject
};
    

RCLASS()
class REditorDebugAndRunAbilityGroupModel : public REditorAbilityGroupModel
{
    ROBJECT

public:
    virtual void FirstTimeInitializeObject() override;

    virtual CString GetName() const override { return U"调试和运行"; }

    EDebugClientState GetClientState() const;

    //start the server
    //and launch the client to connect to the server
    void Launch();
    void Pause();
    void Continue();
    void Stop();

    //return if success
    bool Compile();


    // void Launch(const CString& LaunchCommandLine)=0;
    // void Restart()=0;
    // void Pause()=0;
    // void Continue()=0;
    // void Stop()=0;
    // void StepOver()=0;
    // void StepInto()=0;
    // void StepOut()=0;
    // void AddBreakpoint(const SPath& InFilePath, int64_t InLineIndex, bool InIsEnabled)=0;
    // void RemoveBreakpoint(const SPath& InFilePath, int64_t InLineIndex)=0;
    //default port for debug server
    RFIELD()
    uint16_t DefaultPort=3988;


    RFIELD()
    EDebugConfiguration DebugConfiguration = EDebugConfiguration::Project;

protected:

};